package model.sales;
// Generated Feb 14, 2013 10:33:00 PM by Hibernate Tools 3.2.1.GA


import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * TrsSalesPayment generated by hbm2java
 */
@Entity
@Table(name="trs_sales_payment", schema="sales")
public class SalesPayment  implements java.io.Serializable {

     private long id;
     private SalesMst salesMst;
     private Integer bankId;
     private String deskripsi;
     private BigDecimal sumbangan;
     private BigDecimal bayarTunai;
     private BigDecimal bayarKupon;
     private BigDecimal bayarDebit;
     private BigDecimal tarikTunai;
     private BigDecimal cashAmount;
     private BigDecimal cashback;
     private String insertedLog;

    public SalesPayment() {
    }
   
    @Id 
    @GenericGenerator(name = "generator", strategy = "foreign", 
	parameters = @Parameter(name = "property", value = "salesMst"))
    @GeneratedValue(generator = "generator")
    @Column(name="id", unique=true, nullable=false)
    //@Column(name="id", unique=true, nullable=false)
    public long getId() {
        return this.id;
    }
    
    public void setId(long id) {
        this.id = id;
    }
    
    //@OneToOne(fetch=FetchType.LAZY)
    //@JoinColumn(name="id", unique=true, nullable=false, insertable=false, updatable=false)
    
    @OneToOne(fetch=FetchType.LAZY)
    @PrimaryKeyJoinColumn
    public SalesMst getSalesMst() {
        return this.salesMst;
    }
    
    public void setSalesMst(SalesMst salesMst) {
        this.salesMst = salesMst;
    }
    
    @Column(name="bank_id")
    public Integer getBankId() {
        return this.bankId;
    }
    
    public void setBankId(Integer bankId) {
        this.bankId = bankId;
    }
    
    @Column(name="deskripsi", length=100)
    public String getDeskripsi() {
        return this.deskripsi;
    }
    
    public void setDeskripsi(String deskripsi) {
        this.deskripsi = deskripsi;
    }
    
    @Column(name="sumbangan", precision=13)
    public BigDecimal getSumbangan() {
        return this.sumbangan;
    }
    
    public void setSumbangan(BigDecimal sumbangan) {
        this.sumbangan = sumbangan;
    }
    
    @Column(name="bayar_tunai", precision=13)
    public BigDecimal getBayarTunai() {
        return this.bayarTunai;
    }
    
    public void setBayarTunai(BigDecimal bayarTunai) {
        this.bayarTunai = bayarTunai;
    }
    
    @Column(name="bayar_kupon", precision=13)
    public BigDecimal getBayarKupon() {
        return this.bayarKupon;
    }
    
    public void setBayarKupon(BigDecimal bayarKupon) {
        this.bayarKupon = bayarKupon;
    }
    
    @Column(name="bayar_debit", precision=13, scale=3)
    public BigDecimal getBayarDebit() {
        return this.bayarDebit;
    }
    
    public void setBayarDebit(BigDecimal bayarDebit) {
        this.bayarDebit = bayarDebit;
    }
    
    @Column(name="tarik_tunai", precision=13)
    public BigDecimal getTarikTunai() {
        return this.tarikTunai;
    }
    
    public void setTarikTunai(BigDecimal tarikTunai) {
        this.tarikTunai = tarikTunai;
    }
    
    @Column(name="cash_amount", precision=13)
    public BigDecimal getCashAmount() {
        return this.cashAmount;
    }
    
    public void setCashAmount(BigDecimal cashAmount) {
        this.cashAmount = cashAmount;
    }
    
    @Column(name="cashback", precision=13)
    public BigDecimal getCashback() {
        return this.cashback;
    }
    
    public void setCashback(BigDecimal cashback) {
        this.cashback = cashback;
    }

    @Column(name="inserted_log", length=50)
    public String getInsertedLog() {
        return this.insertedLog;
    }
    
    public void setInsertedLog(String insertedLog) {
        this.insertedLog = insertedLog;
    }
    


}


